package com.gitee.qdbp.general.common.api.event.service;

import java.util.List;
import com.gitee.qdbp.able.exception.ServiceException;
import com.gitee.qdbp.general.common.api.event.enums.Operate;
import com.gitee.qdbp.general.common.api.event.enums.Pointer;
import com.gitee.qdbp.general.common.api.event.model.IEventListener;

/**
 * 事件调度中心
 *
 * @author zhaohuihua
 * @version 170724
 */
public interface IEventCenter {

    List<IEventListener<?, ?, ?>> getListener(String dataType);

    void addListener(String dataType, IEventListener<?, ?, ?> listener);

    boolean removeListener(String dataType);

    boolean removeListener(String dataType, IEventListener<?, ?, ?> listener);

    void clear();

    void trigger(String dataType, Operate operateType, Pointer pointer, Object object) throws ServiceException;
}
